<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
      // function qh(){
      //     let num = +prompt('请输入一个数')
      //     let num2 = +prompt('请输入另一个数')
      //     let sum = num + num2
      //     document.write(sum)
      // }
      // qh()
    function jc(start,end){
      let num = 0
      for(let i = start ; i<=end ; i++){
        num += i
      }
      document.write(num)
    }
    //jc(50,100)
    jc(+prompt('1'),+prompt('2'))
    </script>
</body>
</html>